<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <ui:composition template="../Master/MasterPage.xhtml">
            <ui:define name="isa1">
                <h:outputText value="#{mdata_Index.message}" escape="false"/>
                <div class="t-title">
                    <h3><img src="../Iconpage/master/music.png "/>&nbsp;DATA MANAGER</h3>
                    <div class="t-in">
                        Filter
                        <h:selectOneMenu class="commoboxIm" onchange="submit()" value="#{mdata_Index.idAlbum}"
                                         valueChangeListener="#{mdata_Index.cateAlbumValueChange}">
                            <f:selectItems value="#{mdata_Index.listCateAlbum}"/>
                        </h:selectOneMenu>&nbsp;
                        <h:commandLink class="expoler-window" value="ADD NEW" action="#{malbum_Index.redirectadd}" />
                        <p:dataTable id="dataTable" var="DATA" value="#{mdata_Index.listData}"  
                                     paginator="true" rows="10"  
                                     paginatorTemplate="{CurrentPageReport}  
                                     {FirstPageLink} {PreviousPageLink} {PageLinks} 
                                     {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"  
                                     rowsPerPageTemplate="5,10,15,50">  
                            <p:column style="width: 300px" filterBy="#{DATA.dataName}" 
                                      filterStyle="width:300px" filterMatchMode="contains">  
                                <f:facet name="header">  
                                    <h:outputText value="Name Song" />  
                                </f:facet>  
                                <a href="#" id="ik" class="text-table-title" style="font-weight: 400; font-size: 14px; color: #E25D33 !important">
                                    #{DATA.dataName} - 
                                </a>
                                <span style="right:0; color: #333">&nbsp;&nbsp;#{mdata_Index.randomSongLength()}</span>
                                  <div style="color: #7B7B7B">album - #{DATA.albumName}</div>
                            </p:column>  
<!--                            <p:column> 
                                <f:facet name="header">  
                                    <h:outputText value="Path Directories" />  
                                </f:facet>  
                                #{DATA.dataPath}
                            </p:column>-->
                            <p:column style="width: 20px">  
                                <f:facet name="header">  
                                    <h:outputText value="Option" />  
                                </f:facet>  
                                <h:commandButton class="data-public-#{DATA.dataPublic}" title="Change music public"
                                                 value="#{mdata_Index.returnPublicData(DATA.dataPublic)}" action="#{mdata_Index.updateUserGuest(DATA.dataID)}"/>&nbsp;| 
                                <h:commandButton value="edit" class="optionicon" action="#{mdata_Index.redirectToEdit(DATA.dataID)}" />&nbsp;|
                                <h:commandButton class="optionicon" 
                                                 value="Remove"
                                                 onclick="javascript:return deleteconfirm();"/>
                            </p:column>  
                        </p:dataTable> 
                    </div>
                </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>

